package com.xbe.redis;

import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
import org.springframework.stereotype.Component;

/**
 * @Author: liuzhiting
 * @Desctription: TODO
 * @Date: Created in 2020-08-12 16:25
 * @Version: 1.0
 */
@Component
public class RedisListenerConfig
{
    @Bean
    RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory)
    {
        RedisMessageListenerContainer container = new RedisMessageListenerContainer();
        container.setConnectionFactory(connectionFactory);
        return container;
    }
}
